package com.shishi.fast.generator.controller;

import com.shishi.fast.generator.service.CollectDataService;
import com.shishi.fast.generator.vo.CollectDataRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Author mm
 * @Date 2024/4/10 19:22
 * @Description
 */
@RestController
@RequestMapping("collectData")
public class CollectDataController {

    @Autowired
    private CollectDataService collectDataService;

    @PostMapping("makeTodayData")
    public void makeTodayData(@Valid @RequestBody CollectDataRequest.MakeTodayDataParam param) {
        collectDataService.makeTodayData(param);
    }

    @PostMapping("deleteTodayData")
    public void deleteTodayData(@Valid @RequestBody CollectDataRequest.MakeTodayDataParam param) {
        collectDataService.deleteTodayData(param);
    }

}